package com.xf.lastmall.feign;


import com.xf.lastmall.moudle.request.PayRequestParam;
import com.xf.lastmall.order.api.common.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;


@FeignClient(name = "pay-service")
@RequestMapping("/pay-service/payapi")
public interface PayServiceApi {

    @RequestMapping(value = "/buildpayrequestmap", method = RequestMethod.POST)
    Map<String, Object> buildPayRequestMap(@RequestBody PayRequestParam payRequestParam);


    /*==========================================================================================*/

    @RequestMapping(value = "/pay/orderquery")
    Response mixcOrderQuery(@RequestParam("orderNo") String orderNo);


    @RequestMapping(value = "/verifyResult", method = RequestMethod.POST)
    Response verifyResult(@RequestParam("payType") String payType, @RequestParam("orderNo") String orderNo, @RequestParam("result") String result);

}
